package com.jhgsys.internal.sypq.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.jhgsys.internal.common.entity.BaseEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;


/**
 * 任务管理 Entity
 *
 * @author ganjun
 * @date 2024-11-18 10:06:38
 */
@Data
@TableName("sypq_task")
public class Task extends BaseEntity implements Serializable {

    /**
     * 任务编号,编码规则：TK+年+月+四位序号
     */
    @TableId(value = "task_code")
    @ExcelField(value = "任务编号", width = 120)
    private String taskCode;

    /**
     * 项目编号
     */
    @TableField("project_code")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    @ExcelField(value = "项目编号", width = 120)
    private String projectCode;

    /**
     * 任务类型,数据字典TASK_TYPE,1:排期任务,2:敞水试验,3:伴流试验,4:流线试验
     */
    @TableField("task_type")
    @NotNull(message = "{required}")
    private Integer taskType;

     /**
     * 状态,数据字典TASK_STATUS,1:待排期,2:排期待审核,3:已驳回,4:已排期,5:试验中,6:已完成,7:已暂停,8:未开始
       9-已终止  */
    @TableField("status")
    private Integer status;

    /**
     * 试验工时,精确到0.5天
     */
    @TableField("test_day")
    @ExcelField(value = "试验工时", width = 120)
    private BigDecimal testDay;


    /**
     * 是否重点任务，1：是，0：不是重点任务
     */
    @TableField("iskey_task")
    @Size(max = 1, message = "{noMoreThan}")
    @ExcelField(value = "是否重点任务", width = 120)
    private String   iskeyTask;

    /**
     * 备注
     */
    @TableField("remark")
    @Size(max = 200, message = "{noMoreThan}")
    @ExcelField(value = "备注", width = 120)
    private String remark;

    /**
     * 计划开始时间
     */
    //@TableField(value="plan_startdate",updateStrategy = FieldStrategy.IGNORED)
    @TableField(value="plan_startdate")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelField(value = "计划开始时间", width = 120)
    private Date planStartdate;

    @TableField(value="plan_starttime")
    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @ExcelField(value = "计划开始时间", width = 120)
    private Date planStarttime;
    /**
     * 计划结束时间
     */
    @TableField(value="plan_enddate")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelField(value = "计划结束日期", width = 120)
    private Date planEnddate;

    @TableField(value="plan_endtime")
    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @ExcelField(value = "计划结束日期", width = 120)
    private Date planEndtime;

    /**
     * 实际开始时间
     */
    @TableField(value="actually_startdate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ExcelField(value = "实际开始时间", width = 120)
    private Date actuallyStartdate;

    /**
     * 实际结束时间
     */
    @TableField(value = "actually_enddate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ExcelField(value = "实际结束时间", width = 120)
    private Date actuallyEnddate;

    /**
     * 文件名称
     */
    @TableField("fileinfo")
    @Size(max = 255, message = "{noMoreThan}")
    private String fileinfo;

    //所需资源
    @TableField("rsid")
    @ExcelField(value = "所需资源", width = 120)
    private String rsid;

    @TableField("pause_reason")
    @ExcelField(value = "任务暂停原因", width = 120)
    private String pauseReason;

    @TableField(value="pause_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelField(value = "暂停开始日期", width = 120)
    private Date pauseDate;

    @TableField(value="pause_time")
    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @ExcelField(value = "暂停结束日期", width = 120)
    private Date pauseTime;

    @TableField("key_explain")
    @ExcelField(value = "关键任务说明", width = 120)
    private String keyExplain;

}